package com.yuebao.controller;

import com.yuebao.api.FundProductionService;
import com.yuebao.model.pojo.FundProduction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/fund")
public class FundProductionController {

    @Resource
    FundProductionService fundProductionService;

    @GetMapping("/feign/getAllFundProduction")
    public List<FundProduction> getAllFundProduction(){
        return fundProductionService.query().list();
    }

    
    @PostMapping("/feign/getFundById")
    public FundProduction getFundProductionById(Long id){
        return  fundProductionService.getById(id);
    }

}
